﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class details : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        String id = Request.QueryString["id"];
        DatabaseProcess dp = new DatabaseProcess();
        String query = "SELECT title,details,image_,post_date FROM news WHERE news_id ='"+ id +"'";
        DataTable dt = dp.ConnectDataBaseReturnDT(query);

        title.Text = dt.Rows[0]["title"].ToString();
        date.Text = dt.Rows[0]["post_date"].ToString();
        content.Text = dt.Rows[0]["details"].ToString();
        Image1.ImageUrl = dt.Rows[0]["image_"].ToString();
        Image1.Width = 640;
    }
}